<template>
	<view class="contents" style="100vh">
		<view>
			
			<view  v-for="(item2,index) in SetMeal " :key="index">
				<u-button class="card center" :hair-line="false" :custom-style="{border:'none'}" @click="GoDetail(item2.TJTestId)">
					
						<view class="" style="width: 30%; display: flex;flex-direction: column;">
							<image src="/static/tijian.png" class="image" mode="" style="height: 80px;width:80px;">
							</image>
						</view>
						<view class="" style="width: 70%;text-align:left;">

							<view class="centertext"  >
								<u-icon label="" size="40" name='/static/icon/xiangmu.png'></u-icon>	
								项目：{{item2.TJName}}
							</view>

							<view class="centertext" >
								
								
								<!-- 未对齐111111111111111111111111111111111111111111111111111111 -->
								<u-icon label="" size="40" name='/static/icon/jiage.png'></u-icon>
								价格：{{item2.TJPrice}}
							</view>

						
					</view>
				</u-button>
			</view>



		</view>
	</view>

</template>

<script>
	import {
		mapState,
		mapGetters
	} from 'vuex'

	export default {
		data() {
			return {
				SetMeal: [],
				TJCategoryId: '',
				TJChildId:'',
				TJNName:'',
			}
		},

		onLoad(options) {
			if (options.TJCategoryId != undefined) {
				this.TJCategoryId = options.TJCategoryId;
				this.TJChildId=options.TJChildId
				this.TJNName=options.TJNName
				console.log(this.TJCategoryId + "       111111111")
				uni.hideLoading();
			}
			this.getlist();
		},


		methods: {


			getlist() {
				console.log(this.TJCategoryId + "       222222222")
				console.log("查询")
				this.$request('TJCategory', 'GetTJTest', {
					TJCategoryId: this.TJCategoryId
				}).then(res => {
					console.log(res)
					if (res.code == 1) {
						this.SetMeal = res.data
					}
				console.log(this.SetMeal)
				
				})
			},
			
			
			GoDetail(TJTestId) {
				console.log(TJTestId)
				uni.navigateTo({
					url: `/pages/MedicalExamination/Subscribe/Detail/Detail?TJTestId=${TJTestId}&TJChildId=${this.TJChildId}&TJNName=${this.TJNName}`,
					fail(error) {
						console.log(error)
					}
				})
			},
			

		}
	}
</script>

<style>
	@import './SetMeal.css'
</style>